package com.tjbklx1.pattern.composite.demo4;

import java.util.ArrayList;

/**
 * 树叶节点
 * @author tjbklx1
 * @date 2018-10-11
 */
public class Leaf extends Component {
	@Deprecated
	public void add(Component component) throws UnsupportedOperationException {
		// 空实现,直接抛弃一个"不支持请求"异常
		throw new UnsupportedOperationException();
	}

	@Deprecated
	public void remove(Component component) throws UnsupportedOperationException {
		// 空实现
		throw new UnsupportedOperationException();
	}

	@Deprecated
	public ArrayList<Component> getChildren() throws UnsupportedOperationException {
		// 空实现
		throw new UnsupportedOperationException();
	}
}